require_relative '../lib/csdn_project'

CSDNConfig::CSDNProject.new('carbon-kernel') do |jobs|
	jobs.all.repo_name = 'carbon-kernel'
	jobs.all.repo_group = 'CSDN_DA'
	jobs.all.add_notification 'dtm'
	jobs.all.add_permission 'zhengwx', :all
	
	jobs.continuous.command = CSDNConfig::Command.new do |cmd|
		cmd.standard_build_setup
		cmd.jdk7_setup
		cmd.save_build_number '$WORKSPACE/jenkins_build.txt'
		cmd.clean_build_directory 'target'
		cmd.make_wo_test
		cmd.puts
	end
	
	jobs.release.command = CSDNConfig::Command.new do |cmd|
		cmd.standard_build_setup
		cmd.jdk7_setup
		cmd.checkout_tag '$WORKSPACE/src', '$WORKSPACE/jenkins_build.txt'
		cmd.clean_build_directory 'target'
		cmd.deploy_wo_test
		cmd.puts
	end
	
end